﻿<UserControl x:Class="VSTweaker.UI.Views.ExternalTools"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="384" d:DesignWidth="497">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width=".3*"/>
            <ColumnDefinition Width=".7*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="50"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="35"/>
        </Grid.RowDefinitions>
        
        <TextBlock Grid.ColumnSpan="2" Margin="10">External tools are accessible via the Tools menu.</TextBlock>
        
            <ListBox Grid.Row="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  ItemsSource="{Binding Path=AvailableTools}" SelectedValue="{Binding Path=SelectedTool}">
                </ListBox>
            <Button Grid.Row="2"  VerticalAlignment="Bottom" Height="35" Margin="5,0,5,5">Remove</Button>
        
        <Grid Grid.Column="1" Grid.Row="1"   VerticalAlignment="Stretch" HorizontalAlignment="Stretch" DataContext="{Binding Path=SelectedTool}"> 
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width=".25*"/>
                <ColumnDefinition Width=".75*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="45"/>
                <RowDefinition Height="45"/>
                <RowDefinition Height="45"/>
                <RowDefinition Height="45"/>
            </Grid.RowDefinitions>
            
            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Right" Margin="10">Name</TextBlock>

            <TextBlock Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="10">Command</TextBlock>

            <TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="10">Directory</TextBlock>

            <TextBlock Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="10">Arguments</TextBlock>

            <TextBox Grid.Row ="0" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="10" Text="{Binding Path=Name}"/>
            <TextBox Grid.Row ="1" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="10" Text="{Binding Path=Command}"/>
            <TextBox Grid.Row ="2" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="10" Text="{Binding Path=Directory}"/>
            <TextBox Grid.Row ="3" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="10" Text="{Binding Path=Arguments}"/>
         </Grid>
        
        <Button Grid.Column="1" Grid.Row="2" Width="100" Margin="5,0,5,5">Add</Button>
    </Grid>
</UserControl>
